package com.gitee.loyo.interfaces

import junit.framework.TestCase
import com.gitee.loyo.TUser
import com.gitee.loyo.interfaces.impl.DeleteSQL
import org.junit.Test

class DeleteSQLTest : TestCase(){

    @Test
    fun test(){
        val user = TUser(1L, null, null, null)
        val deleteSQL = DeleteSQL(user)
        assertEquals("delete from t_user where user_id = ?", deleteSQL.getSQL())
        assertEquals(1, deleteSQL.getParameters().size)
        assertEquals(user.userId, deleteSQL.getParameters()[0])
    }
}